$OpenBSD: patch-src_ircd_c,v 1.3 2014/04/19 18:31:45 sthen Exp $
--- src/ircd.c.orig	Sun May 27 14:09:42 2012
+++ src/ircd.c	Sat Apr 19 19:26:26 2014
@@ -242,7 +242,6 @@ make_daemon(void)
 	}
 	else if(pid > 0)
 	{
-		print_startup(pid);
 		exit(EXIT_SUCCESS);
 	}
 
@@ -535,8 +534,17 @@ ratbox_main(int argc, char *argv[])
 #ifndef _WIN32
 	if(geteuid() == 0)
 	{
-		fprintf(stderr, "Don't run ircd as root!!!\n");
-		exit(EXIT_FAILURE);
+		struct passwd *pw;
+
+		if ((pw = getpwnam(IRCD_USER)) == NULL) {
+			fprintf(stderr, "Don't run ircd as root!!!\n");
+			exit(EXIT_FAILURE);
+		}
+
+		if (setusercontext(NULL, pw, pw->pw_uid, LOGIN_SETALL) < 0) {
+			fprintf(stderr, "Can't set user context to %s!\n", IRCD_USER);
+			exit(EXIT_FAILURE);
+		}
 	}
 #endif
 	init_sys();
@@ -654,12 +662,7 @@ ratbox_main(int argc, char *argv[])
 	else
 		ConfigServerHide.links_disabled = 1;
 
-	if(ConfigFileEntry.use_egd && (ConfigFileEntry.egdpool_path != NULL))
-	{
-		rb_init_prng(ConfigFileEntry.egdpool_path, RB_PRNG_EGD);
-	}
-	else
-		rb_init_prng(NULL, RB_PRNG_DEFAULT);
+	rb_init_prng(NULL, RB_PRNG_DEFAULT);
 	seed_random(NULL);
 
 	init_main_logfile(logFileName);
